#myapp的urls.py
from django.urls import path,re_path
from . import views
from django.views.generic.base import RedirectView
app_name='myapp'
urlpatterns =[
    path('', views.hello_world, name='hello_world'),
    path('<int:sumA>/<int:sumB>',views.mysum),
    re_path('(?P<year>(post-)[0-9]*).html',views.mydate),
    #path('redirect/',views.redirect_view,name='redirect_view'),#
    path('redirect-to-home/',RedirectView.as_view(url='/',permanent=True),name='redirect_to_home'),
    path('redirect-view/',views.redirect_view,name='redirect_view')
]